package test;

import java.util.Hashtable;

public class EDINodeImpl implements EDINode {

	private String name;
	private int maxLoops = 1;
	private Hashtable<String, EDINode> nodeList = new Hashtable<String, EDINode>();
	
	public EDINodeImpl(String name){
		this.name = name;
	}
	
	@Override
	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setMaxLoops(int maximumOccurrances) {
		maxLoops = maximumOccurrances;
		
	}
	
	@Override
	public int getMaxLoops() {
		return maxLoops;
	}

	@Override
	public void add(EDINode node) {
		nodeList.put(node.getName(), node);
	}

	@Override
	public EDINode get(String name) {
		return nodeList.get(name);
	}
	
}
